{% extends "base.html" %}
{% load i18n %}
{% load fnd %}
{% load text_utils %}


{% block extrahead %}
<script type="text/javascript" src="/static/syntax/scripts/shCore.js"></script>
<script type="text/javascript" src="/static/syntax/scripts/shBrushXml.js"></script>
<script type="text/javascript">
  SyntaxHighlighter.config.clipboardSwf = 'scripts/clipboard.swf';
  SyntaxHighlighter.all();
</script>
{% endblock %}


{% block content_title %}
<h1>{{ sentence }}</h1>
{% endblock %}

{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="/">{% trans "Home" %}</a> &rsaquo; 
<a href="{{ sentence.get_absolute_url }}">{{ sentence }}</a>
</div>{% endblock %}

{% block content %}
<div class="content-main">
  <div class="module">
    <h2>Text</h2>
    <p>{{ sentence.text }}</p>
  </div>

  <div class="module">
    <h2>{% trans "POS" %}</h2>
    <p class="POS-text">
      {% for aword in sentence.words %}
      {% spaceless %}
      <span class="word">
	<span class="form">{{ aword.form }}</span>&#47<span class="lemma">{{ aword.lemma }}</span>/<span class="tag">{{ aword.cat }}</span>
      </span>
      {% endspaceless %}
      {% endfor %}
    </p>
  </div>

    <div class="module">
        <h2>Clauses et connecteurs</h2>
        {{ sentence|clauses|normalize_punctuation|safe }}
    </div>

  <div class="module">
    <h2>{% trans "Tree" %}</h2>
    <div style="text-align:center">
      <a href="/static/{{ sentence.image.url }}" title="Show image">
        <img src="/static/{{ sentence.image.url }}" style="width:95%" alt="{{ sentence }}" />
      </a>
    </div>
  </div>

  <div class="module">
    <h2>Source</h2>
    <pre class="brush: xml">{{ sentence.xml }}</pre>
  </div>
</div>

{% endblock %}
